<?php
/*
 +----------------------------------------------------------------------
 + Title        : LogInit 控制器
 + Author       : Randy_chen
 + Version      : V1.0.0.1
 + Initial-Time : 2023/12/23 7:53
 + Last-time    : 2023/12/23 7:53+ chen2
 + Desc         : LogInit
 +----------------------------------------------------------------------
*/


namespace app\http\middleware;

use think\Response;

class LogInit
{
    public function handle($request, \Closure $next)
    {
        $request->trade_id = $request->param('trade_id')?? date('YmdHis').rand(10000,99999);
        return $next($request);
    }
}